//
//  UIImage+Utils.h
//  WeCaring-养老家属端
//
//  Created by GJS on 2018/9/28.
//  Copyright © 2018年 GJS. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIImage+Wechat.h"

@interface UIImage (Utils)

/**
 *  @brief 根据self,返回一个按照最大比例切割出来的图片(就是根据比例从原图的中间切取最大的图片返回)
 *
 *  @param ratio 想要的比例(像素的宽/像素的高)
 *
 *  @return 返回一个按照最大比例切割出来的图片
 */
- (UIImage *)cutImageMaxWithRatio:(CGFloat)ratio;

- (UIImage *)captureView:(UIView *)theView;

+ (UIImage *)convertViewToImage:(UIView *)view;

- (UIImage *)scaleToSize:(CGSize)size;

- (UIImage *)compressToSomeMB:(CGFloat)uploadMB;

+ (UIImage *)imageWithName:(NSString *)strImgName;

+(UIImage *)colorizeImage:(UIImage *)baseImage withColor:(UIColor *)theColor;
@end
